home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / Collections.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  20.3 KB  |  764 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Collections.a
  3. ;
  4. ;    Contains:    Collection Manager Interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.x
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1989-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__COLLECTIONS__') = 'UNDEFINED' THEN
  18. __COLLECTIONS__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  24.     include 'MixedMode.a'
  25.     ENDIF
  26.  
  27. ; ************
  28. ;  Constants 
  29. ; ************
  30. ;  Convenience constants for functions which optionally return values 
  31.  
  32. kCollectionDontWantTag            EQU        0
  33. kCollectionDontWantId            EQU        0
  34. kCollectionDontWantSize            EQU        0
  35. kCollectionDontWantAttributes    EQU        0
  36. kCollectionDontWantIndex        EQU        0
  37. kCollectionDontWantData            EQU        0
  38.  
  39. ;  attributes bits 
  40.  
  41. kCollectionNoAttributes            EQU        $00000000            ; no attributes bits set 
  42. kCollectionAllAttributes        EQU        $FFFFFFFF            ; all attributes bits set 
  43. kCollectionUserAttributes        EQU        $0000FFFF            ; user attributes bits 
  44. kCollectionDefaultAttributes    EQU        $40000000            ; default attributes - unlocked, persistent 
  45.  
  46. ;  
  47. ;    Attribute bits 0 through 15 (entire low word) are reserved for use by the application.
  48. ;    Attribute bits 16 through 31 (entire high word) are reserved for use by the Collection Manager.
  49. ;    Only bits 31 (kCollectionLockBit) and 30 (kCollectionPersistenceBit) currently have meaning.
  50. ;
  51.  
  52.  
  53. kCollectionUser0Bit                EQU        0
  54. kCollectionUser1Bit                EQU        1
  55. kCollectionUser2Bit                EQU        2
  56. kCollectionUser3Bit                EQU        3
  57. kCollectionUser4Bit                EQU        4
  58. kCollectionUser5Bit                EQU        5
  59. kCollectionUser6Bit                EQU        6
  60. kCollectionUser7Bit                EQU        7
  61. kCollectionUser8Bit                EQU        8
  62. kCollectionUser9Bit                EQU        9
  63. kCollectionUser10Bit            EQU        10
  64. kCollectionUser11Bit            EQU        11
  65. kCollectionUser12Bit            EQU        12
  66. kCollectionUser13Bit            EQU        13
  67. kCollectionUser14Bit            EQU        14
  68. kCollectionUser15Bit            EQU        15
  69. kCollectionReserved0Bit            EQU        16
  70. kCollectionReserved1Bit            EQU        17
  71. kCollectionReserved2Bit            EQU        18
  72. kCollectionReserved3Bit            EQU        19
  73. kCollectionReserved4Bit            EQU        20
  74. kCollectionReserved5Bit            EQU        21
  75. kCollectionReserved6Bit            EQU        22
  76. kCollectionReserved7Bit            EQU        23
  77. kCollectionReserved8Bit            EQU        24
  78. kCollectionReserved9Bit            EQU        25
  79. kCollectionReserved10Bit        EQU        26
  80. kCollectionReserved11Bit        EQU        27
  81. kCollectionReserved12Bit        EQU        28
  82. kCollectionReserved13Bit        EQU        29
  83. kCollectionPersistenceBit        EQU        30
  84. kCollectionLockBit                EQU        31
  85.  
  86. ;  attribute masks 
  87.  
  88. kCollectionUser0Mask            EQU        $00000001
  89. kCollectionUser1Mask            EQU        $00000002
  90. kCollectionUser2Mask            EQU        $00000004
  91. kCollectionUser3Mask            EQU        $00000008
  92. kCollectionUser4Mask            EQU        $00000010
  93. kCollectionUser5Mask            EQU        $00000020
  94. kCollectionUser6Mask            EQU        $00000040
  95. kCollectionUser7Mask            EQU        $00000080
  96. kCollectionUser8Mask            EQU        $00000100
  97. kCollectionUser9Mask            EQU        $00000200
  98. kCollectionUser10Mask            EQU        $00000400
  99. kCollectionUser11Mask            EQU        $00000800
  100. kCollectionUser12Mask            EQU        $00001000
  101. kCollectionUser13Mask            EQU        $00002000
  102. kCollectionUser14Mask            EQU        $00004000
  103. kCollectionUser15Mask            EQU        $00008000
  104. kCollectionReserved0Mask        EQU        $00010000
  105. kCollectionReserved1Mask        EQU        $00020000
  106. kCollectionReserved2Mask        EQU        $00040000
  107. kCollectionReserved3Mask        EQU        $00080000
  108. kCollectionReserved4Mask        EQU        $00100000
  109. kCollectionReserved5Mask        EQU        $00200000
  110. kCollectionReserved6Mask        EQU        $00400000
  111. kCollectionReserved7Mask        EQU        $00800000
  112. kCollectionReserved8Mask        EQU        $01000000
  113. kCollectionReserved9Mask        EQU        $02000000
  114. kCollectionReserved10Mask        EQU        $04000000
  115. kCollectionReserved11Mask        EQU        $08000000
  116. kCollectionReserved12Mask        EQU        $10000000
  117. kCollectionReserved13Mask        EQU        $20000000
  118. kCollectionPersistenceMask        EQU        $40000000
  119. kCollectionLockMask                EQU        $80000000
  120.  
  121. ; **********
  122. ;  Types   
  123. ; **********
  124. ;  abstract data type for a collection 
  125.  
  126.  
  127. ;  collection member 4 byte tag 
  128. ; typedef FourCharCode                     CollectionTag
  129.  
  130. ; ********************************************
  131. ; ************* Public interfaces ************
  132. ; ********************************************
  133. ;
  134. ; pascal Collection NewCollection(void )
  135. ;
  136.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  137.         Macro
  138.         _NewCollection
  139.             moveq               #0,D0
  140.             dc.w                $ABF6
  141.         EndM
  142.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  143.         IMPORT_CFM_FUNCTION NewCollection
  144.     ENDIF
  145.  
  146.  
  147. ;
  148. ; pascal void DisposeCollection(Collection c)
  149. ;
  150.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  151.         Macro
  152.         _DisposeCollection
  153.             moveq               #1,D0
  154.             dc.w                $ABF6
  155.         EndM
  156.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  157.         IMPORT_CFM_FUNCTION DisposeCollection
  158.     ENDIF
  159.  
  160.  
  161. ;
  162. ; pascal Collection CloneCollection(Collection c)
  163. ;
  164.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  165.         Macro
  166.         _CloneCollection
  167.             moveq               #2,D0
  168.             dc.w                $ABF6
  169.         EndM
  170.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  171.         IMPORT_CFM_FUNCTION CloneCollection
  172.     ENDIF
  173.  
  174.  
  175. ;
  176. ; pascal SInt32 CountCollectionOwners(Collection c)
  177. ;
  178.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  179.         Macro
  180.         _CountCollectionOwners
  181.             moveq               #3,D0
  182.             dc.w                $ABF6
  183.         EndM
  184.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  185.         IMPORT_CFM_FUNCTION CountCollectionOwners
  186.     ENDIF
  187.  
  188.  
  189. ;
  190. ; pascal Collection CopyCollection(Collection srcCollection, Collection dstCollection)
  191. ;
  192.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  193.         Macro
  194.         _CopyCollection
  195.             moveq               #4,D0
  196.             dc.w                $ABF6
  197.         EndM
  198.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  199.         IMPORT_CFM_FUNCTION CopyCollection
  200.     ENDIF
  201.  
  202.  
  203. ;
  204. ; pascal SInt32 GetCollectionDefaultAttributes(Collection c)
  205. ;
  206.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  207.         Macro
  208.         _GetCollectionDefaultAttributes
  209.             moveq               #5,D0
  210.             dc.w                $ABF6
  211.         EndM
  212.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  213.         IMPORT_CFM_FUNCTION GetCollectionDefaultAttributes
  214.     ENDIF
  215.  
  216.  
  217. ;
  218. ; pascal void SetCollectionDefaultAttributes(Collection c, SInt32 whichAttributes, SInt32 newAttributes)
  219. ;
  220.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  221.         Macro
  222.         _SetCollectionDefaultAttributes
  223.             moveq               #6,D0
  224.             dc.w                $ABF6
  225.         EndM
  226.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  227.         IMPORT_CFM_FUNCTION SetCollectionDefaultAttributes
  228.     ENDIF
  229.  
  230.  
  231. ;
  232. ; pascal SInt32 CountCollectionItems(Collection c)
  233. ;
  234.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  235.         Macro
  236.         _CountCollectionItems
  237.             moveq               #7,D0
  238.             dc.w                $ABF6
  239.         EndM
  240.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  241.         IMPORT_CFM_FUNCTION CountCollectionItems
  242.     ENDIF
  243.  
  244.  
  245. ;
  246. ; pascal OSErr AddCollectionItem(Collection c, CollectionTag tag, SInt32 id, SInt32 itemSize, void *itemData)
  247. ;
  248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  249.         Macro
  250.         _AddCollectionItem
  251.             moveq               #8,D0
  252.             dc.w                $ABF6
  253.         EndM
  254.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  255.         IMPORT_CFM_FUNCTION AddCollectionItem
  256.     ENDIF
  257.  
  258.  
  259. ;
  260. ; pascal OSErr GetCollectionItem(Collection c, CollectionTag tag, SInt32 id, SInt32 *itemSize, void *itemData)
  261. ;
  262.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  263.         Macro
  264.         _GetCollectionItem
  265.             moveq               #9,D0
  266.             dc.w                $ABF6
  267.         EndM
  268.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  269.         IMPORT_CFM_FUNCTION GetCollectionItem
  270.     ENDIF
  271.  
  272.  
  273. ;
  274. ; pascal OSErr RemoveCollectionItem(Collection c, CollectionTag tag, SInt32 id)
  275. ;
  276.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  277.         Macro
  278.         _RemoveCollectionItem
  279.             moveq               #10,D0
  280.             dc.w                $ABF6
  281.         EndM
  282.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  283.         IMPORT_CFM_FUNCTION RemoveCollectionItem
  284.     ENDIF
  285.  
  286.  
  287. ;
  288. ; pascal OSErr SetCollectionItemInfo(Collection c, CollectionTag tag, SInt32 id, SInt32 whichAttributes, SInt32 newAttributes)
  289. ;
  290.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  291.         Macro
  292.         _SetCollectionItemInfo
  293.             moveq               #11,D0
  294.             dc.w                $ABF6
  295.         EndM
  296.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  297.         IMPORT_CFM_FUNCTION SetCollectionItemInfo
  298.     ENDIF
  299.  
  300.  
  301. ;
  302. ; pascal OSErr GetCollectionItemInfo(Collection c, CollectionTag tag, SInt32 id, SInt32 *index, SInt32 *itemSize, SInt32 *attributes)
  303. ;
  304.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  305.         Macro
  306.         _GetCollectionItemInfo
  307.             moveq               #12,D0
  308.             dc.w                $ABF6
  309.         EndM
  310.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  311.         IMPORT_CFM_FUNCTION GetCollectionItemInfo
  312.     ENDIF
  313.  
  314.  
  315. ;
  316. ; pascal OSErr ReplaceIndexedCollectionItem(Collection c, SInt32 index, SInt32 itemSize, void *itemData)
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  319.         Macro
  320.         _ReplaceIndexedCollectionItem
  321.             moveq               #13,D0
  322.             dc.w                $ABF6
  323.         EndM
  324.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  325.         IMPORT_CFM_FUNCTION ReplaceIndexedCollectionItem
  326.     ENDIF
  327.  
  328.  
  329. ;
  330. ; pascal OSErr GetIndexedCollectionItem(Collection c, SInt32 index, SInt32 *itemSize, void *itemData)
  331. ;
  332.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  333.         Macro
  334.         _GetIndexedCollectionItem
  335.             moveq               #14,D0
  336.             dc.w                $ABF6
  337.         EndM
  338.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  339.         IMPORT_CFM_FUNCTION GetIndexedCollectionItem
  340.     ENDIF
  341.  
  342.  
  343. ;
  344. ; pascal OSErr RemoveIndexedCollectionItem(Collection c, SInt32 index)
  345. ;
  346.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  347.         Macro
  348.         _RemoveIndexedCollectionItem
  349.             moveq               #15,D0
  350.             dc.w                $ABF6
  351.         EndM
  352.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  353.         IMPORT_CFM_FUNCTION RemoveIndexedCollectionItem
  354.     ENDIF
  355.  
  356.  
  357. ;
  358. ; pascal OSErr SetIndexedCollectionItemInfo(Collection c, SInt32 index, SInt32 whichAttributes, SInt32 newAttributes)
  359. ;
  360.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  361.         Macro
  362.         _SetIndexedCollectionItemInfo
  363.             moveq               #16,D0
  364.             dc.w                $ABF6
  365.         EndM
  366.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  367.         IMPORT_CFM_FUNCTION SetIndexedCollectionItemInfo
  368.     ENDIF
  369.  
  370.  
  371. ;
  372. ; pascal OSErr GetIndexedCollectionItemInfo(Collection c, SInt32 index, CollectionTag *tag, SInt32 *id, SInt32 *itemSize, SInt32 *attributes)
  373. ;
  374.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  375.         Macro
  376.         _GetIndexedCollectionItemInfo
  377.             moveq               #17,D0
  378.             dc.w                $ABF6
  379.         EndM
  380.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  381.         IMPORT_CFM_FUNCTION GetIndexedCollectionItemInfo
  382.     ENDIF
  383.  
  384.  
  385. ;
  386. ; pascal Boolean CollectionTagExists(Collection c, CollectionTag tag)
  387. ;
  388.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  389.         Macro
  390.         _CollectionTagExists
  391.             moveq               #18,D0
  392.             dc.w                $ABF6
  393.         EndM
  394.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  395.         IMPORT_CFM_FUNCTION CollectionTagExists
  396.     ENDIF
  397.  
  398.  
  399. ;
  400. ; pascal SInt32 CountCollectionTags(Collection c)
  401. ;
  402.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  403.         Macro
  404.         _CountCollectionTags
  405.             moveq               #19,D0
  406.             dc.w                $ABF6
  407.         EndM
  408.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  409.         IMPORT_CFM_FUNCTION CountCollectionTags
  410.     ENDIF
  411.  
  412.  
  413. ;
  414. ; pascal OSErr GetIndexedCollectionTag(Collection c, SInt32 tagIndex, CollectionTag *tag)
  415. ;
  416.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  417.         Macro
  418.         _GetIndexedCollectionTag
  419.             moveq               #20,D0
  420.             dc.w                $ABF6
  421.         EndM
  422.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  423.         IMPORT_CFM_FUNCTION GetIndexedCollectionTag
  424.     ENDIF
  425.  
  426.  
  427. ;
  428. ; pascal SInt32 CountTaggedCollectionItems(Collection c, CollectionTag tag)
  429. ;
  430.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  431.         Macro
  432.         _CountTaggedCollectionItems
  433.             moveq               #21,D0
  434.             dc.w                $ABF6
  435.         EndM
  436.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  437.         IMPORT_CFM_FUNCTION CountTaggedCollectionItems
  438.     ENDIF
  439.  
  440.  
  441. ;
  442. ; pascal OSErr GetTaggedCollectionItem(Collection c, CollectionTag tag, SInt32 whichItem, SInt32 *itemSize, void *itemData)
  443. ;
  444.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  445.         Macro
  446.         _GetTaggedCollectionItem
  447.             moveq               #22,D0
  448.             dc.w                $ABF6
  449.         EndM
  450.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  451.         IMPORT_CFM_FUNCTION GetTaggedCollectionItem
  452.     ENDIF
  453.  
  454.  
  455. ;
  456. ; pascal OSErr GetTaggedCollectionItemInfo(Collection c, CollectionTag tag, SInt32 whichItem, SInt32 *id, SInt32 *index, SInt32 *itemSize, SInt32 *attributes)
  457. ;
  458.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  459.         Macro
  460.         _GetTaggedCollectionItemInfo
  461.             moveq               #23,D0
  462.             dc.w                $ABF6
  463.         EndM
  464.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  465.         IMPORT_CFM_FUNCTION GetTaggedCollectionItemInfo
  466.     ENDIF
  467.  
  468.  
  469. ;
  470. ; pascal void PurgeCollection(Collection c, SInt32 whichAttributes, SInt32 matchingAttributes)
  471. ;
  472.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  473.         Macro
  474.         _PurgeCollection
  475.             moveq               #24,D0
  476.             dc.w                $ABF6
  477.         EndM
  478.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  479.         IMPORT_CFM_FUNCTION PurgeCollection
  480.     ENDIF
  481.  
  482.  
  483. ;
  484. ; pascal void PurgeCollectionTag(Collection c, CollectionTag tag)
  485. ;
  486.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  487.         Macro
  488.         _PurgeCollectionTag
  489.             moveq               #25,D0
  490.             dc.w                $ABF6
  491.         EndM
  492.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION PurgeCollectionTag
  494.     ENDIF
  495.  
  496.  
  497. ;
  498. ; pascal void EmptyCollection(Collection c)
  499. ;
  500.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  501.         Macro
  502.         _EmptyCollection
  503.             moveq               #26,D0
  504.             dc.w                $ABF6
  505.         EndM
  506.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  507.         IMPORT_CFM_FUNCTION EmptyCollection
  508.     ENDIF
  509.  
  510. ;
  511. ; pascal OSErr FlattenCollection(Collection c, CollectionFlattenUPP flattenProc, void *refCon)
  512. ;
  513.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  514.         Macro
  515.         _FlattenCollection
  516.             moveq               #27,D0
  517.             dc.w                $ABF6
  518.         EndM
  519.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  520.         IMPORT_CFM_FUNCTION FlattenCollection
  521.     ENDIF
  522.  
  523.  
  524. ;
  525. ; pascal OSErr FlattenPartialCollection(Collection c, CollectionFlattenUPP flattenProc, void *refCon, SInt32 whichAttributes, SInt32 matchingAttributes)
  526. ;
  527.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  528.         Macro
  529.         _FlattenPartialCollection
  530.             moveq               #28,D0
  531.             dc.w                $ABF6
  532.         EndM
  533.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  534.         IMPORT_CFM_FUNCTION FlattenPartialCollection
  535.     ENDIF
  536.  
  537.  
  538. ;
  539. ; pascal OSErr UnflattenCollection(Collection c, CollectionFlattenUPP flattenProc, void *refCon)
  540. ;
  541.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  542.         Macro
  543.         _UnflattenCollection
  544.             moveq               #29,D0
  545.             dc.w                $ABF6
  546.         EndM
  547.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION UnflattenCollection
  549.     ENDIF
  550.  
  551.  
  552. ;
  553. ; pascal CollectionExceptionUPP GetCollectionExceptionProc(Collection c)
  554. ;
  555.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  556.         Macro
  557.         _GetCollectionExceptionProc
  558.             moveq               #30,D0
  559.             dc.w                $ABF6
  560.         EndM
  561.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  562.         IMPORT_CFM_FUNCTION GetCollectionExceptionProc
  563.     ENDIF
  564.  
  565.  
  566. ;
  567. ; pascal void SetCollectionExceptionProc(Collection c, CollectionExceptionUPP exceptionProc)
  568. ;
  569.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  570.         Macro
  571.         _SetCollectionExceptionProc
  572.             moveq               #31,D0
  573.             dc.w                $ABF6
  574.         EndM
  575.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  576.         IMPORT_CFM_FUNCTION SetCollectionExceptionProc
  577.     ENDIF
  578.  
  579.  
  580. ;
  581. ; pascal Collection GetNewCollection(SInt16 collectionID)
  582. ;
  583.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  584.         Macro
  585.         _GetNewCollection
  586.             moveq               #32,D0
  587.             dc.w                $ABF6
  588.         EndM
  589.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  590.         IMPORT_CFM_FUNCTION GetNewCollection
  591.     ENDIF
  592.  
  593.  
  594. ; *********************************************************************
  595. ; ************** Utility routines for handle-based access *************
  596. ; *********************************************************************
  597. ;
  598. ; pascal OSErr AddCollectionItemHdl(Collection aCollection, CollectionTag tag, SInt32 id, Handle itemData)
  599. ;
  600.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  601.         Macro
  602.         _AddCollectionItemHdl
  603.             moveq               #33,D0
  604.             dc.w                $ABF6
  605.         EndM
  606.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  607.         IMPORT_CFM_FUNCTION AddCollectionItemHdl
  608.     ENDIF
  609.  
  610.  
  611. ;
  612. ; pascal OSErr GetCollectionItemHdl(Collection aCollection, CollectionTag tag, SInt32 id, Handle itemData)
  613. ;
  614.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  615.         Macro
  616.         _GetCollectionItemHdl
  617.             moveq               #34,D0
  618.             dc.w                $ABF6
  619.         EndM
  620.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  621.         IMPORT_CFM_FUNCTION GetCollectionItemHdl
  622.     ENDIF
  623.  
  624.  
  625. ;
  626. ; pascal OSErr ReplaceIndexedCollectionItemHdl(Collection aCollection, SInt32 index, Handle itemData)
  627. ;
  628.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  629.         Macro
  630.         _ReplaceIndexedCollectionItemHdl
  631.             moveq               #35,D0
  632.             dc.w                $ABF6
  633.         EndM
  634.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  635.         IMPORT_CFM_FUNCTION ReplaceIndexedCollectionItemHdl
  636.     ENDIF
  637.  
  638.  
  639. ;
  640. ; pascal OSErr GetIndexedCollectionItemHdl(Collection aCollection, SInt32 index, Handle itemData)
  641. ;
  642.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  643.         Macro
  644.         _GetIndexedCollectionItemHdl
  645.             moveq               #36,D0
  646.             dc.w                $ABF6
  647.         EndM
  648.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  649.         IMPORT_CFM_FUNCTION GetIndexedCollectionItemHdl
  650.     ENDIF
  651.  
  652.  
  653. ;
  654. ; pascal OSErr FlattenCollectionToHdl(Collection aCollection, Handle flattened)
  655. ;
  656.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  657.         Macro
  658.         _FlattenCollectionToHdl
  659.             moveq               #37,D0
  660.             dc.w                $ABF6
  661.         EndM
  662.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  663.         IMPORT_CFM_FUNCTION FlattenCollectionToHdl
  664.     ENDIF
  665.  
  666.  
  667. ;
  668. ; pascal OSErr UnflattenCollectionFromHdl(Collection aCollection, Handle flattened)
  669. ;
  670.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  671.         Macro
  672.         _UnflattenCollectionFromHdl
  673.             moveq               #38,D0
  674.             dc.w                $ABF6
  675.         EndM
  676.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  677.         IMPORT_CFM_FUNCTION UnflattenCollectionFromHdl
  678.     ENDIF
  679.  
  680.  
  681.     IF OLDROUTINENAMES THEN
  682.  
  683. dontWantTag                        EQU        0
  684. dontWantId                        EQU        0
  685. dontWantSize                    EQU        0
  686. dontWantAttributes                EQU        0
  687. dontWantIndex                    EQU        0
  688. dontWantData                    EQU        0
  689.  
  690. noCollectionAttributes            EQU        $00000000
  691. allCollectionAttributes            EQU        $FFFFFFFF
  692. userCollectionAttributes        EQU        $0000FFFF
  693. defaultCollectionAttributes        EQU        $40000000
  694.  
  695. collectionUser0Bit                EQU        0
  696. collectionUser1Bit                EQU        1
  697. collectionUser2Bit                EQU        2
  698. collectionUser3Bit                EQU        3
  699. collectionUser4Bit                EQU        4
  700. collectionUser5Bit                EQU        5
  701. collectionUser6Bit                EQU        6
  702. collectionUser7Bit                EQU        7
  703. collectionUser8Bit                EQU        8
  704. collectionUser9Bit                EQU        9
  705. collectionUser10Bit                EQU        10
  706. collectionUser11Bit                EQU        11
  707. collectionUser12Bit                EQU        12
  708. collectionUser13Bit                EQU        13
  709. collectionUser14Bit                EQU        14
  710. collectionUser15Bit                EQU        15
  711. collectionReserved0Bit            EQU        16
  712. collectionReserved1Bit            EQU        17
  713. collectionReserved2Bit            EQU        18
  714. collectionReserved3Bit            EQU        19
  715. collectionReserved4Bit            EQU        20
  716. collectionReserved5Bit            EQU        21
  717. collectionReserved6Bit            EQU        22
  718. collectionReserved7Bit            EQU        23
  719. collectionReserved8Bit            EQU        24
  720. collectionReserved9Bit            EQU        25
  721. collectionReserved10Bit            EQU        26
  722. collectionReserved11Bit            EQU        27
  723. collectionReserved12Bit            EQU        28
  724. collectionReserved13Bit            EQU        29
  725. collectionPersistenceBit        EQU        30
  726. collectionLockBit                EQU        31
  727.  
  728. collectionUser0Mask                EQU        $00000001
  729. collectionUser1Mask                EQU        $00000002
  730. collectionUser2Mask                EQU        $00000004
  731. collectionUser3Mask                EQU        $00000008
  732. collectionUser4Mask                EQU        $00000010
  733. collectionUser5Mask                EQU        $00000020
  734. collectionUser6Mask                EQU        $00000040
  735. collectionUser7Mask                EQU        $00000080
  736. collectionUser8Mask                EQU        $00000100
  737. collectionUser9Mask                EQU        $00000200
  738. collectionUser10Mask            EQU        $00000400
  739. collectionUser11Mask            EQU        $00000800
  740. collectionUser12Mask            EQU        $00001000
  741. collectionUser13Mask            EQU        $00002000
  742. collectionUser14Mask            EQU        $00004000
  743. collectionUser15Mask            EQU        $00008000
  744. collectionReserved0Mask            EQU        $00010000
  745. collectionReserved1Mask            EQU        $00020000
  746. collectionReserved2Mask            EQU        $00040000
  747. collectionReserved3Mask            EQU        $00080000
  748. collectionReserved4Mask            EQU        $00100000
  749. collectionReserved5Mask            EQU        $00200000
  750. collectionReserved6Mask            EQU        $00400000
  751. collectionReserved7Mask            EQU        $00800000
  752. collectionReserved8Mask            EQU        $01000000
  753. collectionReserved9Mask            EQU        $02000000
  754. collectionReserved10Mask        EQU        $04000000
  755. collectionReserved11Mask        EQU        $08000000
  756. collectionReserved12Mask        EQU        $10000000
  757. collectionReserved13Mask        EQU        $20000000
  758. collectionPersistenceMask        EQU        $40000000
  759. collectionLockMask                EQU        $80000000
  760.     ENDIF    ; OLDROUTINENAMES
  761.  
  762.     ENDIF ; __COLLECTIONS__ 
  763.  
  764.